home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************
- CLASS: MiscImageDragView
- INHERITS FROM: MiscDragView
- PROGRAMMER: Todd Thomas
- START DATE: Feb 15, 1993
- LAST CHANGED: November 30, 1994
- VERSION: 0.4
- CHANGES: See the end of the implementation file.
-
- A class that allows you to drag and drop any images that NXImage
- understands. That includes data from NXTIFFPboardType,
- NXFilenamePboardType, and NXPostScriptPboardType.
- I don't know how useful this class actually is, but it is here as
- more of an example of how to use MiscDragView. As for options, you have
- the option of either dragging the image in the view or just the icon
- representation (which will be the TIFF icon). For now, though the well will
- accept a lot of different types of data, it will only put TIFF data on
- the pasteboard in preparation of a source drag.
-
- * Copyright (C) 1995 Robert Todd Thomas
- * Use is governed by the MiscKit license
- ****************************************************************************/
-
- #import <appkit/appkit.h>
- #import <misckit/MiscDragView.h>
-
- @interface MiscImageDragView : MiscDragView
- {
- BOOL dragIconRepresentation; // drag icon rep. or the entire image?
- }
-
- - initFrame: (NXRect *)frameRect;
- - initDragTypes;
- - setDragIconRepresentation: (BOOL)aBool;
- - (BOOL)dragIconRepresentation;
-
- - (BOOL)setupForSourceDrag;
- - calculateDragPoint: (NXPoint *)dragPoint andOffset: (NXPoint *)offset;
- - (BOOL)prepareForDragOperation:sender;
- - (BOOL)performDragOperation: sender;
-
- - read: (NXTypedStream *)stream;
- - write: (NXTypedStream *)stream;
-
- @end
-